using System;
using OhioState.AssetManaged;
using OhioState.Math;
namespace OhioState.Graphics.Proxy
{
    /// <summary>
    /// SharedBox class inherits from IShape and SharedAsset
    /// </summary>
    [Serializable]
    public class SharedBox : SharedAsset, IShape
    {
        private BoundingBox _box = new BoundingBox();
        /// <summary>
        /// Get Bounding box 
        /// </summary>
        public BoundingBox BBox
        {
            get { return _box; }
        }
        /// <summary>
        /// Constructor for SharedBox
        /// </summary>
        public SharedBox()
            : this("")
        {
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">name</param>
        public SharedBox(String name)
            : base(name)
        {
        }
        /// <summary>
        /// Lowerleft position of box
        /// </summary>
        public Vector3 LowerLeft
        {
            get { return _box.LowerLeft; }
            set
            {
                _box.LowerLeft = value;
                FireUpdateChangedEvent(this);
            }
        }
        /// <summary>
        /// Upper right position of box
        /// </summary>
        public Vector3 UpperRight
        {
            get { return _box.UpperRight; }
            set
            {
                _box.UpperRight = value;
                FireUpdateChangedEvent(this);
            }
        }
        /// <summary>
        /// Get Set Accessor for Width of the box
        /// </summary>
        public float Width
        {
            get { return _box.Width; }
            set
            {
                _box.Width = value;
                FireUpdateChangedEvent(this);
            }
        }
        /// <summary>
        /// Get Set Accessor for Height of the box
        /// </summary>
        public float Height
        {
            get { return _box.Height; }
            set
            {
                _box.Height = value;
                FireUpdateChangedEvent(this);
            }
        }
        /// <summary>
        /// Get Set Accessor for depth of the box
        /// </summary>
        public float Depth
        {
            get { return _box.Depth; }
            set
            {
                _box.Depth = value;
                FireUpdateChangedEvent(this);
            }
        }
        /// <summary>
        /// Implementation of IShape Get ShapeType property
        /// </summary>
        public ShapeType ShapeType
        {
            get { return ShapeType.Box; }
        }
    }
}
